//
//  NSSet+Lc.m
//  18Birdies
//
//  Created by Lc on 15/7/1.
//  Copyright (c) 2015年 Lc. All rights reserved.
//

#import "NSSet+Lc.h"

@implementation NSSet (Lc)

- (BOOL)containsAllObjects:(NSArray*)array {
  for (id object in array) {
    if (![self containsObject:object]) {
      return NO;
    }
  }
  return YES;
}

- (NSArray*)toArray {
  if (self.count == 0) {
    return nil;
  }
  NSMutableArray* array = [NSMutableArray array];
  for (id object in self) {
    [array addObject:object];
  }
  return array;
}

@end
